Most of drawing software used to deal with images provide the user with functions for extracting of a subpart of an image. Typically, the user has to perform the following operations when partitioning an image. First, he delimitates the boundary of the subpart he is looking for; he can either draw a free form or a primitive form (rectangle, circle . . . ). Then, based on user's drawing, the software tries to divide the image in two different parts: the first one placed inside the drawing, and the second one placed outside of it.
In the particular case of a free form drawn by the user, the software closes the drawing by linking the first point to the last one. This is necessary to be sure that the drawing defines an “inside” and an “outside” parts in the image. This is illustrated on FIGS. 1 and 2. In FIG. 1, the free from 10 drawn by the user is not closed as there is no connection between the start point of the free form and its end point. A link 20 is created by the software for obtaining a closed free form (which is a boundary), as illustrated on FIG. 2. By this way, the known method for partitioning the image is able to separate the image in two distinct areas: the first one is inside the boundary and the second one is outside the boundary. Then, after the user validation of the separation (sometimes it can be automatic), only the inner part is kept. This choice can sometimes be reversed to keep the outer part, but it is not always the case. The subpart of the image is just selected. To create another image from this selection, or remove it or anything else, the user has to do another action. For example to create another image with his selection the user has to create a new image and then do a copy paste, or invert his selection and remove the unwanted part.
The known solutions for partitioning an image contain several limitations. The first one is that the user can not always define precisely the sub part he wants. That is because either the software only allows him to use a primitive form (e.g. a rectangle) to specify the boundaries, either it links the first point to the last one to create a closed boundary, without taking into account the form of the drawing (if it already defines a closed curve for example). This leads to bad results, as illustrated on FIGS. 3 and 4. In FIG. 3, the user has drawn a free form on the image which is a closed free form. However, there is no connection between the start and end points of the closed free form so that the software creates a link between these two points, thus leading to the creation of a second closed area as illustrated on FIG. 4. Hence, the user's intention is not taking into account.
Another drawback is that the subpart which is kept by the software is always the inner one. In some programs, the user can do some operations to invert that and keep the outer part instead of the inner one but that is not always possible.
A further drawback is that the selection of several subparts is time consuming and tedious. This is illustrated in the following scenario wherein the user works on an image and wants to extract two different parts from it. With the existing software, he has to follow these steps: import the original image, define the first subpart by taking care of drawing a closed shape, copy/paste this part in a new image (or invert the selection and remove the unselected part), import the original image again, define the second subpart by taking care of drawing a closed shape, copy/paste this part in a new image (or invert the selection and remove the unselected part).
One more drawback is that if the user wants to simply cut an image in half, he will have to do a circle around the part he wants, as illustrated on FIGS. 5 and 6. This is not intuitive, time consuming, but also not ergonomic.
An additional drawback is that the choice of subparts can be unpredictable as the known solutions relies on the detection of the “inside” and the “outside” of the closed areas drawn by the user or of the primitive form. However, the identification of the “inside” and the “outside” of a free form can be a complicated task for the current algorithms; especially, when the free form comprises several intersections, the algorithm cannot be able to identify which parts of the free form are the inside and outside. Moreover, the detection of the “inside” and the “outside” of the closed areas is time consuming for the computer system because the detection is not straightforward for the current algorithms. Hence, a significant amount of computing resources are used for a result that can be unpredictable.
Within this context, there is still a need for an improved method for partitioning an image into one or more selectable subparts.